package com.crealth.model;

import java.io.Serializable;

import com.alibaba.fastjson.JSONObject;
import com.crealth.utils.Utils;

public class TeamWorkDiaryModel implements Serializable {
	private static final long serialVersionUID = 3502L;

	private int id;  //团队经理 工作日志
	private int teamID;  //团队id
	private int userID;
	private String workDay;  //哪天 20160906
	private String content1;  //
	private String content2;  //
	private String content3;
	
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}	
	public int getTeamID() {
		return teamID;
	}
	public void setTeamID(int teamID) {
		this.teamID = teamID;
	}	
	public int getUserID() {
		return userID;
	}
	public void setUserID(int userID) {
		this.userID = userID;
	}
	public String getWorkDay() {
		return workDay;
	}
	public void setWorkDay(String workDay) {
		this.workDay = workDay;
	}
	public String getContent1() {
		return content1;
	}
	public void setContent1(String content1) {
		this.content1 = content1;
	}
	public String getContent2() {
		return content2;
	}
	public void setContent2(String content2) {
		this.content2 = content2;
	}
	public String getContent3() {
		return content3;
	}
	public void setContent3(String content3) {
		this.content3 = content3;
	}

	public JSONObject toJSONObject() {
		JSONObject jsonObj = new JSONObject();
		jsonObj.put("id", id);
		jsonObj.put("teamID", teamID);
		jsonObj.put("workDay", workDay);
		jsonObj.put("content1", content1);
		jsonObj.put("content2", content2);
		jsonObj.put("content3", content3);
		
		return jsonObj;
	}
	
	public void parseFromJson(JSONObject json) {
		id = Utils.getJsonIntValue(json, "workDiaryid", 0);
		content1 = Utils.getJsonString(json, "content1");
		content2 = Utils.getJsonString(json, "content2");		
		content3 = Utils.getJsonString(json, "content3");
	}
	
}
